using System;
using System.ComponentModel;
using System.Data;
using System.Windows.Forms;
using C1.Win.C1Input;
using C1.Win.C1List;
using C1.Win.C1TrueDBGrid;
using PCSComMaterials.Plan.BO;
using PCSComUtils.Common;
using PCSComUtils.Common.BO;
using PCSComUtils.MasterSetup.DS;
using PCSComUtils.PCSExc;
using PCSUtils.Log;
using PCSUtils.Utils;
using AlignHorzEnum = C1.Win.C1TrueDBGrid.AlignHorzEnum;
using CancelEventArgs = System.ComponentModel.CancelEventArgs;
using ColEventArgs = C1.Win.C1TrueDBGrid.ColEventArgs;

namespace PCSMaterials.Mps
{
	/// <summary>
	/// Summary description for WorkDayCalendar.
	/// </summary>
	public class WorkDayCalendar : Form
	{
		private Label label3;


		private C1Combo cboCCN;
		private Label lblCCN;
		private Button btnDelete;
		private Button btnSave;
		private Button btnAdd;
		private Button btnEdit;
		private Button btnHelp;
		private Button btnClose;
		private C1TrueDBGrid dgrdData;
		private CheckBox chkSunday;
		private CheckBox chkMonday;
		private CheckBox chkTuesday;
		private CheckBox chkWednesday;
		private CheckBox chkSaturday;
		private CheckBox chkThursday;
		private CheckBox chkFriday;
		private ComboBox cboYear;
		private GroupBox grpWorkDay;
		///// <summary>
		///// Required designer variable.
		///// </summary>
		private Container components = null;


		private EnumAction mFormMode = EnumAction.Default;
		private const string THIS = "PCSMaterials.Mps.WorkDayCalendar";
		private const string DAYOFWEEK = "Day";
		private const string DAY_FORMAT= "dd-MM";
		private DataSet dstData;
		private C1DateEdit dtmDate;
		private WorkDayCalendarBO boWorkDayCalendar = new WorkDayCalendarBO();
		private MST_WorkingDayMasterVO voWorkingMaster = new MST_WorkingDayMasterVO();
		private DataTable dtbGridLayOut;
		private bool blnHasError;

		private Label lblDate;
		private Label lblDay;
		private Label lblComment;

		public WorkDayCalendar()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(WorkDayCalendar));
			this.dgrdData = new C1.Win.C1TrueDBGrid.C1TrueDBGrid();
			this.grpWorkDay = new System.Windows.Forms.GroupBox();
			this.chkSunday = new System.Windows.Forms.CheckBox();
			this.chkMonday = new System.Windows.Forms.CheckBox();
			this.chkTuesday = new System.Windows.Forms.CheckBox();
			this.chkWednesday = new System.Windows.Forms.CheckBox();
			this.chkSaturday = new System.Windows.Forms.CheckBox();
			this.chkThursday = new System.Windows.Forms.CheckBox();
			this.chkFriday = new System.Windows.Forms.CheckBox();
			this.cboYear = new System.Windows.Forms.ComboBox();
			this.label3 = new System.Windows.Forms.Label();
			this.cboCCN = new C1.Win.C1List.C1Combo();
			this.lblCCN = new System.Windows.Forms.Label();
			this.btnDelete = new System.Windows.Forms.Button();
			this.btnSave = new System.Windows.Forms.Button();
			this.btnAdd = new System.Windows.Forms.Button();
			this.btnEdit = new System.Windows.Forms.Button();
			this.btnHelp = new System.Windows.Forms.Button();
			this.btnClose = new System.Windows.Forms.Button();
			this.dtmDate = new C1.Win.C1Input.C1DateEdit();
			this.lblDate = new System.Windows.Forms.Label();
			this.lblDay = new System.Windows.Forms.Label();
			this.lblComment = new System.Windows.Forms.Label();
			((System.ComponentModel.ISupportInitialize)(this.dgrdData)).BeginInit();
			this.grpWorkDay.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.cboCCN)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.dtmDate)).BeginInit();
			this.SuspendLayout();
			// 
			// dgrdData
			// 
			this.dgrdData.AccessibleDescription = resources.GetString("dgrdData.AccessibleDescription");
			this.dgrdData.AccessibleName = resources.GetString("dgrdData.AccessibleName");
			this.dgrdData.AllowAddNew = ((bool)(resources.GetObject("dgrdData.AllowAddNew")));
			this.dgrdData.AllowArrows = ((bool)(resources.GetObject("dgrdData.AllowArrows")));
			this.dgrdData.AllowColMove = ((bool)(resources.GetObject("dgrdData.AllowColMove")));
			this.dgrdData.AllowColSelect = ((bool)(resources.GetObject("dgrdData.AllowColSelect")));
			this.dgrdData.AllowDelete = ((bool)(resources.GetObject("dgrdData.AllowDelete")));
			this.dgrdData.AllowDrag = ((bool)(resources.GetObject("dgrdData.AllowDrag")));
			this.dgrdData.AllowFilter = ((bool)(resources.GetObject("dgrdData.AllowFilter")));
			this.dgrdData.AllowHorizontalSplit = ((bool)(resources.GetObject("dgrdData.AllowHorizontalSplit")));
			this.dgrdData.AllowRowSelect = ((bool)(resources.GetObject("dgrdData.AllowRowSelect")));
			this.dgrdData.AllowSort = ((bool)(resources.GetObject("dgrdData.AllowSort")));
			this.dgrdData.AllowUpdate = ((bool)(resources.GetObject("dgrdData.AllowUpdate")));
			this.dgrdData.AllowUpdateOnBlur = ((bool)(resources.GetObject("dgrdData.AllowUpdateOnBlur")));
			this.dgrdData.AllowVerticalSplit = ((bool)(resources.GetObject("dgrdData.AllowVerticalSplit")));
			this.dgrdData.AlternatingRows = ((bool)(resources.GetObject("dgrdData.AlternatingRows")));
			this.dgrdData.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dgrdData.Anchor")));
			this.dgrdData.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dgrdData.BackgroundImage")));
			this.dgrdData.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dgrdData.BorderStyle")));
			this.dgrdData.Caption = resources.GetString("dgrdData.Caption");
			this.dgrdData.CaptionHeight = ((int)(resources.GetObject("dgrdData.CaptionHeight")));
			this.dgrdData.CellTipsDelay = ((int)(resources.GetObject("dgrdData.CellTipsDelay")));
			this.dgrdData.CellTipsWidth = ((int)(resources.GetObject("dgrdData.CellTipsWidth")));
			this.dgrdData.ChildGrid = ((C1.Win.C1TrueDBGrid.C1TrueDBGrid)(resources.GetObject("dgrdData.ChildGrid")));
			this.dgrdData.CollapseColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.CollapseColor")));
			this.dgrdData.ColumnFooters = ((bool)(resources.GetObject("dgrdData.ColumnFooters")));
			this.dgrdData.ColumnHeaders = ((bool)(resources.GetObject("dgrdData.ColumnHeaders")));
			this.dgrdData.DefColWidth = ((int)(resources.GetObject("dgrdData.DefColWidth")));
			this.dgrdData.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dgrdData.Dock")));
			this.dgrdData.EditDropDown = ((bool)(resources.GetObject("dgrdData.EditDropDown")));
			this.dgrdData.EmptyRows = ((bool)(resources.GetObject("dgrdData.EmptyRows")));
			this.dgrdData.Enabled = ((bool)(resources.GetObject("dgrdData.Enabled")));
			this.dgrdData.ExpandColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.ExpandColor")));
			this.dgrdData.ExposeCellMode = ((C1.Win.C1TrueDBGrid.ExposeCellModeEnum)(resources.GetObject("dgrdData.ExposeCellMode")));
			this.dgrdData.ExtendRightColumn = ((bool)(resources.GetObject("dgrdData.ExtendRightColumn")));
			this.dgrdData.FetchRowStyles = ((bool)(resources.GetObject("dgrdData.FetchRowStyles")));
			this.dgrdData.FilterBar = ((bool)(resources.GetObject("dgrdData.FilterBar")));
			this.dgrdData.FlatStyle = ((C1.Win.C1TrueDBGrid.FlatModeEnum)(resources.GetObject("dgrdData.FlatStyle")));
			this.dgrdData.Font = ((System.Drawing.Font)(resources.GetObject("dgrdData.Font")));
			this.dgrdData.GroupByAreaVisible = ((bool)(resources.GetObject("dgrdData.GroupByAreaVisible")));
			this.dgrdData.GroupByCaption = resources.GetString("dgrdData.GroupByCaption");
			this.dgrdData.Images.Add(((System.Drawing.Image)(resources.GetObject("resource"))));
			this.dgrdData.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dgrdData.ImeMode")));
			this.dgrdData.LinesPerRow = ((int)(resources.GetObject("dgrdData.LinesPerRow")));
			this.dgrdData.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.Location")));
			this.dgrdData.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder;
			this.dgrdData.Name = "dgrdData";
			this.dgrdData.PictureAddnewRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureAddnewRow")));
			this.dgrdData.PictureCurrentRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureCurrentRow")));
			this.dgrdData.PictureFilterBar = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFilterBar")));
			this.dgrdData.PictureFooterRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFooterRow")));
			this.dgrdData.PictureHeaderRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureHeaderRow")));
			this.dgrdData.PictureModifiedRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureModifiedRow")));
			this.dgrdData.PictureStandardRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureStandardRow")));
			this.dgrdData.PreviewInfo.AllowSizing = ((bool)(resources.GetObject("dgrdData.PreviewInfo.AllowSizing")));
			this.dgrdData.PreviewInfo.Caption = resources.GetString("dgrdData.PreviewInfo.Caption");
			this.dgrdData.PreviewInfo.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.PreviewInfo.Location")));
			this.dgrdData.PreviewInfo.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.PreviewInfo.Size")));
			this.dgrdData.PreviewInfo.ToolBars = ((bool)(resources.GetObject("dgrdData.PreviewInfo.ToolBars")));
			this.dgrdData.PreviewInfo.UIStrings.Content = ((string[])(resources.GetObject("dgrdData.PreviewInfo.UIStrings.Content")));
			this.dgrdData.PreviewInfo.ZoomFactor = ((System.Double)(resources.GetObject("dgrdData.PreviewInfo.ZoomFactor")));
			this.dgrdData.PrintInfo.MaxRowHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.MaxRowHeight")));
			this.dgrdData.PrintInfo.OwnerDrawPageFooter = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageFooter")));
			this.dgrdData.PrintInfo.OwnerDrawPageHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageHeader")));
			this.dgrdData.PrintInfo.PageFooter = resources.GetString("dgrdData.PrintInfo.PageFooter");
			this.dgrdData.PrintInfo.PageFooterHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageFooterHeight")));
			this.dgrdData.PrintInfo.PageHeader = resources.GetString("dgrdData.PrintInfo.PageHeader");
			this.dgrdData.PrintInfo.PageHeaderHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageHeaderHeight")));
			this.dgrdData.PrintInfo.PrintHorizontalSplits = ((bool)(resources.GetObject("dgrdData.PrintInfo.PrintHorizontalSplits")));
			this.dgrdData.PrintInfo.ProgressCaption = resources.GetString("dgrdData.PrintInfo.ProgressCaption");
			this.dgrdData.PrintInfo.RepeatColumnFooters = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnFooters")));
			this.dgrdData.PrintInfo.RepeatColumnHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnHeaders")));
			this.dgrdData.PrintInfo.RepeatGridHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatGridHeader")));
			this.dgrdData.PrintInfo.RepeatSplitHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatSplitHeaders")));
			this.dgrdData.PrintInfo.ShowOptionsDialog = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowOptionsDialog")));
			this.dgrdData.PrintInfo.ShowProgressForm = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowProgressForm")));
			this.dgrdData.PrintInfo.ShowSelection = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowSelection")));
			this.dgrdData.PrintInfo.UseGridColors = ((bool)(resources.GetObject("dgrdData.PrintInfo.UseGridColors")));
			this.dgrdData.RecordSelectors = ((bool)(resources.GetObject("dgrdData.RecordSelectors")));
			this.dgrdData.RecordSelectorWidth = ((int)(resources.GetObject("dgrdData.RecordSelectorWidth")));
			this.dgrdData.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dgrdData.RightToLeft")));
			this.dgrdData.RowDivider.Color = ((System.Drawing.Color)(resources.GetObject("resource.Color")));
			this.dgrdData.RowDivider.Style = ((C1.Win.C1TrueDBGrid.LineStyleEnum)(resources.GetObject("resource.Style")));
			this.dgrdData.RowHeight = ((int)(resources.GetObject("dgrdData.RowHeight")));
			this.dgrdData.RowSubDividerColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.RowSubDividerColor")));
			this.dgrdData.ScrollTips = ((bool)(resources.GetObject("dgrdData.ScrollTips")));
			this.dgrdData.ScrollTrack = ((bool)(resources.GetObject("dgrdData.ScrollTrack")));
			this.dgrdData.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.Size")));
			this.dgrdData.SpringMode = ((bool)(resources.GetObject("dgrdData.SpringMode")));
			this.dgrdData.TabAcrossSplits = ((bool)(resources.GetObject("dgrdData.TabAcrossSplits")));
			this.dgrdData.TabIndex = ((int)(resources.GetObject("dgrdData.TabIndex")));
			this.dgrdData.Text = resources.GetString("dgrdData.Text");
			this.dgrdData.ViewCaptionWidth = ((int)(resources.GetObject("dgrdData.ViewCaptionWidth")));
			this.dgrdData.ViewColumnWidth = ((int)(resources.GetObject("dgrdData.ViewColumnWidth")));
			this.dgrdData.Visible = ((bool)(resources.GetObject("dgrdData.Visible")));
			this.dgrdData.WrapCellPointer = ((bool)(resources.GetObject("dgrdData.WrapCellPointer")));
			this.dgrdData.AfterColUpdate += new C1.Win.C1TrueDBGrid.ColEventHandler(this.dgrdData_AfterColUpdate);
			this.dgrdData.PropBag = resources.GetString("dgrdData.PropBag");
			// 
			// grpWorkDay
			// 
			this.grpWorkDay.AccessibleDescription = resources.GetString("grpWorkDay.AccessibleDescription");
			this.grpWorkDay.AccessibleName = resources.GetString("grpWorkDay.AccessibleName");
			this.grpWorkDay.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("grpWorkDay.Anchor")));
			this.grpWorkDay.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("grpWorkDay.BackgroundImage")));
			this.grpWorkDay.Controls.Add(this.chkSunday);
			this.grpWorkDay.Controls.Add(this.chkMonday);
			this.grpWorkDay.Controls.Add(this.chkTuesday);
			this.grpWorkDay.Controls.Add(this.chkWednesday);
			this.grpWorkDay.Controls.Add(this.chkSaturday);
			this.grpWorkDay.Controls.Add(this.chkThursday);
			this.grpWorkDay.Controls.Add(this.chkFriday);
			this.grpWorkDay.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("grpWorkDay.Dock")));
			this.grpWorkDay.Enabled = ((bool)(resources.GetObject("grpWorkDay.Enabled")));
			this.grpWorkDay.Font = ((System.Drawing.Font)(resources.GetObject("grpWorkDay.Font")));
			this.grpWorkDay.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("grpWorkDay.ImeMode")));
			this.grpWorkDay.Location = ((System.Drawing.Point)(resources.GetObject("grpWorkDay.Location")));
			this.grpWorkDay.Name = "grpWorkDay";
			this.grpWorkDay.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("grpWorkDay.RightToLeft")));
			this.grpWorkDay.Size = ((System.Drawing.Size)(resources.GetObject("grpWorkDay.Size")));
			this.grpWorkDay.TabIndex = ((int)(resources.GetObject("grpWorkDay.TabIndex")));
			this.grpWorkDay.TabStop = false;
			this.grpWorkDay.Text = resources.GetString("grpWorkDay.Text");
			this.grpWorkDay.Visible = ((bool)(resources.GetObject("grpWorkDay.Visible")));
			// 
			// chkSunday
			// 
			this.chkSunday.AccessibleDescription = resources.GetString("chkSunday.AccessibleDescription");
			this.chkSunday.AccessibleName = resources.GetString("chkSunday.AccessibleName");
			this.chkSunday.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("chkSunday.Anchor")));
			this.chkSunday.Appearance = ((System.Windows.Forms.Appearance)(resources.GetObject("chkSunday.Appearance")));
			this.chkSunday.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkSunday.BackgroundImage")));
			this.chkSunday.CheckAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkSunday.CheckAlign")));
			this.chkSunday.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("chkSunday.Dock")));
			this.chkSunday.Enabled = ((bool)(resources.GetObject("chkSunday.Enabled")));
			this.chkSunday.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("chkSunday.FlatStyle")));
			this.chkSunday.Font = ((System.Drawing.Font)(resources.GetObject("chkSunday.Font")));
			this.chkSunday.Image = ((System.Drawing.Image)(resources.GetObject("chkSunday.Image")));
			this.chkSunday.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkSunday.ImageAlign")));
			this.chkSunday.ImageIndex = ((int)(resources.GetObject("chkSunday.ImageIndex")));
			this.chkSunday.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("chkSunday.ImeMode")));
			this.chkSunday.Location = ((System.Drawing.Point)(resources.GetObject("chkSunday.Location")));
			this.chkSunday.Name = "chkSunday";
			this.chkSunday.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("chkSunday.RightToLeft")));
			this.chkSunday.Size = ((System.Drawing.Size)(resources.GetObject("chkSunday.Size")));
			this.chkSunday.TabIndex = ((int)(resources.GetObject("chkSunday.TabIndex")));
			this.chkSunday.Text = resources.GetString("chkSunday.Text");
			this.chkSunday.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkSunday.TextAlign")));
			this.chkSunday.Visible = ((bool)(resources.GetObject("chkSunday.Visible")));
			// 
			// chkMonday
			// 
			this.chkMonday.AccessibleDescription = resources.GetString("chkMonday.AccessibleDescription");
			this.chkMonday.AccessibleName = resources.GetString("chkMonday.AccessibleName");
			this.chkMonday.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("chkMonday.Anchor")));
			this.chkMonday.Appearance = ((System.Windows.Forms.Appearance)(resources.GetObject("chkMonday.Appearance")));
			this.chkMonday.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkMonday.BackgroundImage")));
			this.chkMonday.CheckAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkMonday.CheckAlign")));
			this.chkMonday.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("chkMonday.Dock")));
			this.chkMonday.Enabled = ((bool)(resources.GetObject("chkMonday.Enabled")));
			this.chkMonday.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("chkMonday.FlatStyle")));
			this.chkMonday.Font = ((System.Drawing.Font)(resources.GetObject("chkMonday.Font")));
			this.chkMonday.Image = ((System.Drawing.Image)(resources.GetObject("chkMonday.Image")));
			this.chkMonday.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkMonday.ImageAlign")));
			this.chkMonday.ImageIndex = ((int)(resources.GetObject("chkMonday.ImageIndex")));
			this.chkMonday.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("chkMonday.ImeMode")));
			this.chkMonday.Location = ((System.Drawing.Point)(resources.GetObject("chkMonday.Location")));
			this.chkMonday.Name = "chkMonday";
			this.chkMonday.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("chkMonday.RightToLeft")));
			this.chkMonday.Size = ((System.Drawing.Size)(resources.GetObject("chkMonday.Size")));
			this.chkMonday.TabIndex = ((int)(resources.GetObject("chkMonday.TabIndex")));
			this.chkMonday.Text = resources.GetString("chkMonday.Text");
			this.chkMonday.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkMonday.TextAlign")));
			this.chkMonday.Visible = ((bool)(resources.GetObject("chkMonday.Visible")));
			// 
			// chkTuesday
			// 
			this.chkTuesday.AccessibleDescription = resources.GetString("chkTuesday.AccessibleDescription");
			this.chkTuesday.AccessibleName = resources.GetString("chkTuesday.AccessibleName");
			this.chkTuesday.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("chkTuesday.Anchor")));
			this.chkTuesday.Appearance = ((System.Windows.Forms.Appearance)(resources.GetObject("chkTuesday.Appearance")));
			this.chkTuesday.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkTuesday.BackgroundImage")));
			this.chkTuesday.CheckAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkTuesday.CheckAlign")));
			this.chkTuesday.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("chkTuesday.Dock")));
			this.chkTuesday.Enabled = ((bool)(resources.GetObject("chkTuesday.Enabled")));
			this.chkTuesday.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("chkTuesday.FlatStyle")));
			this.chkTuesday.Font = ((System.Drawing.Font)(resources.GetObject("chkTuesday.Font")));
			this.chkTuesday.Image = ((System.Drawing.Image)(resources.GetObject("chkTuesday.Image")));
			this.chkTuesday.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkTuesday.ImageAlign")));
			this.chkTuesday.ImageIndex = ((int)(resources.GetObject("chkTuesday.ImageIndex")));
			this.chkTuesday.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("chkTuesday.ImeMode")));
			this.chkTuesday.Location = ((System.Drawing.Point)(resources.GetObject("chkTuesday.Location")));
			this.chkTuesday.Name = "chkTuesday";
			this.chkTuesday.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("chkTuesday.RightToLeft")));
			this.chkTuesday.Size = ((System.Drawing.Size)(resources.GetObject("chkTuesday.Size")));
			this.chkTuesday.TabIndex = ((int)(resources.GetObject("chkTuesday.TabIndex")));
			this.chkTuesday.Text = resources.GetString("chkTuesday.Text");
			this.chkTuesday.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkTuesday.TextAlign")));
			this.chkTuesday.Visible = ((bool)(resources.GetObject("chkTuesday.Visible")));
			// 
			// chkWednesday
			// 
			this.chkWednesday.AccessibleDescription = resources.GetString("chkWednesday.AccessibleDescription");
			this.chkWednesday.AccessibleName = resources.GetString("chkWednesday.AccessibleName");
			this.chkWednesday.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("chkWednesday.Anchor")));
			this.chkWednesday.Appearance = ((System.Windows.Forms.Appearance)(resources.GetObject("chkWednesday.Appearance")));
			this.chkWednesday.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkWednesday.BackgroundImage")));
			this.chkWednesday.CheckAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkWednesday.CheckAlign")));
			this.chkWednesday.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("chkWednesday.Dock")));
			this.chkWednesday.Enabled = ((bool)(resources.GetObject("chkWednesday.Enabled")));
			this.chkWednesday.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("chkWednesday.FlatStyle")));
			this.chkWednesday.Font = ((System.Drawing.Font)(resources.GetObject("chkWednesday.Font")));
			this.chkWednesday.Image = ((System.Drawing.Image)(resources.GetObject("chkWednesday.Image")));
			this.chkWednesday.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkWednesday.ImageAlign")));
			this.chkWednesday.ImageIndex = ((int)(resources.GetObject("chkWednesday.ImageIndex")));
			this.chkWednesday.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("chkWednesday.ImeMode")));
			this.chkWednesday.Location = ((System.Drawing.Point)(resources.GetObject("chkWednesday.Location")));
			this.chkWednesday.Name = "chkWednesday";
			this.chkWednesday.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("chkWednesday.RightToLeft")));
			this.chkWednesday.Size = ((System.Drawing.Size)(resources.GetObject("chkWednesday.Size")));
			this.chkWednesday.TabIndex = ((int)(resources.GetObject("chkWednesday.TabIndex")));
			this.chkWednesday.Text = resources.GetString("chkWednesday.Text");
			this.chkWednesday.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkWednesday.TextAlign")));
			this.chkWednesday.Visible = ((bool)(resources.GetObject("chkWednesday.Visible")));
			// 
			// chkSaturday
			// 
			this.chkSaturday.AccessibleDescription = resources.GetString("chkSaturday.AccessibleDescription");
			this.chkSaturday.AccessibleName = resources.GetString("chkSaturday.AccessibleName");
			this.chkSaturday.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("chkSaturday.Anchor")));
			this.chkSaturday.Appearance = ((System.Windows.Forms.Appearance)(resources.GetObject("chkSaturday.Appearance")));
			this.chkSaturday.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkSaturday.BackgroundImage")));
			this.chkSaturday.CheckAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkSaturday.CheckAlign")));
			this.chkSaturday.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("chkSaturday.Dock")));
			this.chkSaturday.Enabled = ((bool)(resources.GetObject("chkSaturday.Enabled")));
			this.chkSaturday.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("chkSaturday.FlatStyle")));
			this.chkSaturday.Font = ((System.Drawing.Font)(resources.GetObject("chkSaturday.Font")));
			this.chkSaturday.Image = ((System.Drawing.Image)(resources.GetObject("chkSaturday.Image")));
			this.chkSaturday.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkSaturday.ImageAlign")));
			this.chkSaturday.ImageIndex = ((int)(resources.GetObject("chkSaturday.ImageIndex")));
			this.chkSaturday.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("chkSaturday.ImeMode")));
			this.chkSaturday.Location = ((System.Drawing.Point)(resources.GetObject("chkSaturday.Location")));
			this.chkSaturday.Name = "chkSaturday";
			this.chkSaturday.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("chkSaturday.RightToLeft")));
			this.chkSaturday.Size = ((System.Drawing.Size)(resources.GetObject("chkSaturday.Size")));
			this.chkSaturday.TabIndex = ((int)(resources.GetObject("chkSaturday.TabIndex")));
			this.chkSaturday.Text = resources.GetString("chkSaturday.Text");
			this.chkSaturday.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkSaturday.TextAlign")));
			this.chkSaturday.Visible = ((bool)(resources.GetObject("chkSaturday.Visible")));
			// 
			// chkThursday
			// 
			this.chkThursday.AccessibleDescription = resources.GetString("chkThursday.AccessibleDescription");
			this.chkThursday.AccessibleName = resources.GetString("chkThursday.AccessibleName");
			this.chkThursday.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("chkThursday.Anchor")));
			this.chkThursday.Appearance = ((System.Windows.Forms.Appearance)(resources.GetObject("chkThursday.Appearance")));
			this.chkThursday.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkThursday.BackgroundImage")));
			this.chkThursday.CheckAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkThursday.CheckAlign")));
			this.chkThursday.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("chkThursday.Dock")));
			this.chkThursday.Enabled = ((bool)(resources.GetObject("chkThursday.Enabled")));
			this.chkThursday.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("chkThursday.FlatStyle")));
			this.chkThursday.Font = ((System.Drawing.Font)(resources.GetObject("chkThursday.Font")));
			this.chkThursday.Image = ((System.Drawing.Image)(resources.GetObject("chkThursday.Image")));
			this.chkThursday.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkThursday.ImageAlign")));
			this.chkThursday.ImageIndex = ((int)(resources.GetObject("chkThursday.ImageIndex")));
			this.chkThursday.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("chkThursday.ImeMode")));
			this.chkThursday.Location = ((System.Drawing.Point)(resources.GetObject("chkThursday.Location")));
			this.chkThursday.Name = "chkThursday";
			this.chkThursday.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("chkThursday.RightToLeft")));
			this.chkThursday.Size = ((System.Drawing.Size)(resources.GetObject("chkThursday.Size")));
			this.chkThursday.TabIndex = ((int)(resources.GetObject("chkThursday.TabIndex")));
			this.chkThursday.Text = resources.GetString("chkThursday.Text");
			this.chkThursday.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkThursday.TextAlign")));
			this.chkThursday.Visible = ((bool)(resources.GetObject("chkThursday.Visible")));
			// 
			// chkFriday
			// 
			this.chkFriday.AccessibleDescription = resources.GetString("chkFriday.AccessibleDescription");
			this.chkFriday.AccessibleName = resources.GetString("chkFriday.AccessibleName");
			this.chkFriday.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("chkFriday.Anchor")));
			this.chkFriday.Appearance = ((System.Windows.Forms.Appearance)(resources.GetObject("chkFriday.Appearance")));
			this.chkFriday.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkFriday.BackgroundImage")));
			this.chkFriday.CheckAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkFriday.CheckAlign")));
			this.chkFriday.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("chkFriday.Dock")));
			this.chkFriday.Enabled = ((bool)(resources.GetObject("chkFriday.Enabled")));
			this.chkFriday.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("chkFriday.FlatStyle")));
			this.chkFriday.Font = ((System.Drawing.Font)(resources.GetObject("chkFriday.Font")));
			this.chkFriday.Image = ((System.Drawing.Image)(resources.GetObject("chkFriday.Image")));
			this.chkFriday.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkFriday.ImageAlign")));
			this.chkFriday.ImageIndex = ((int)(resources.GetObject("chkFriday.ImageIndex")));
			this.chkFriday.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("chkFriday.ImeMode")));
			this.chkFriday.Location = ((System.Drawing.Point)(resources.GetObject("chkFriday.Location")));
			this.chkFriday.Name = "chkFriday";
			this.chkFriday.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("chkFriday.RightToLeft")));
			this.chkFriday.Size = ((System.Drawing.Size)(resources.GetObject("chkFriday.Size")));
			this.chkFriday.TabIndex = ((int)(resources.GetObject("chkFriday.TabIndex")));
			this.chkFriday.Text = resources.GetString("chkFriday.Text");
			this.chkFriday.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkFriday.TextAlign")));
			this.chkFriday.Visible = ((bool)(resources.GetObject("chkFriday.Visible")));
			// 
			// cboYear
			// 
			this.cboYear.AccessibleDescription = resources.GetString("cboYear.AccessibleDescription");
			this.cboYear.AccessibleName = resources.GetString("cboYear.AccessibleName");
			this.cboYear.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("cboYear.Anchor")));
			this.cboYear.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("cboYear.BackgroundImage")));
			this.cboYear.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("cboYear.Dock")));
			this.cboYear.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cboYear.Enabled = ((bool)(resources.GetObject("cboYear.Enabled")));
			this.cboYear.Font = ((System.Drawing.Font)(resources.GetObject("cboYear.Font")));
			this.cboYear.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("cboYear.ImeMode")));
			this.cboYear.IntegralHeight = ((bool)(resources.GetObject("cboYear.IntegralHeight")));
			this.cboYear.ItemHeight = ((int)(resources.GetObject("cboYear.ItemHeight")));
			this.cboYear.Items.AddRange(new object[] {
														 resources.GetString("cboYear.Items"),
														 resources.GetString("cboYear.Items1"),
														 resources.GetString("cboYear.Items2"),
														 resources.GetString("cboYear.Items3"),
														 resources.GetString("cboYear.Items4"),
														 resources.GetString("cboYear.Items5"),
														 resources.GetString("cboYear.Items6"),
														 resources.GetString("cboYear.Items7"),
														 resources.GetString("cboYear.Items8"),
														 resources.GetString("cboYear.Items9"),
														 resources.GetString("cboYear.Items10"),
														 resources.GetString("cboYear.Items11"),
														 resources.GetString("cboYear.Items12"),
														 resources.GetString("cboYear.Items13"),
														 resources.GetString("cboYear.Items14"),
														 resources.GetString("cboYear.Items15"),
														 resources.GetString("cboYear.Items16"),
														 resources.GetString("cboYear.Items17"),
														 resources.GetString("cboYear.Items18"),
														 resources.GetString("cboYear.Items19"),
														 resources.GetString("cboYear.Items20"),
														 resources.GetString("cboYear.Items21"),
														 resources.GetString("cboYear.Items22"),
														 resources.GetString("cboYear.Items23"),
														 resources.GetString("cboYear.Items24"),
														 resources.GetString("cboYear.Items25"),
														 resources.GetString("cboYear.Items26"),
														 resources.GetString("cboYear.Items27"),
														 resources.GetString("cboYear.Items28"),
														 resources.GetString("cboYear.Items29")});
			this.cboYear.Location = ((System.Drawing.Point)(resources.GetObject("cboYear.Location")));
			this.cboYear.MaxDropDownItems = ((int)(resources.GetObject("cboYear.MaxDropDownItems")));
			this.cboYear.MaxLength = ((int)(resources.GetObject("cboYear.MaxLength")));
			this.cboYear.Name = "cboYear";
			this.cboYear.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("cboYear.RightToLeft")));
			this.cboYear.Size = ((System.Drawing.Size)(resources.GetObject("cboYear.Size")));
			this.cboYear.TabIndex = ((int)(resources.GetObject("cboYear.TabIndex")));
			this.cboYear.Text = resources.GetString("cboYear.Text");
			this.cboYear.Visible = ((bool)(resources.GetObject("cboYear.Visible")));
			this.cboYear.SelectedIndexChanged += new System.EventHandler(this.cboYear_SelectedIndexChanged);
			// 
			// label3
			// 
			this.label3.AccessibleDescription = resources.GetString("label3.AccessibleDescription");
			this.label3.AccessibleName = resources.GetString("label3.AccessibleName");
			this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label3.Anchor")));
			this.label3.AutoSize = ((bool)(resources.GetObject("label3.AutoSize")));
			this.label3.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label3.Dock")));
			this.label3.Enabled = ((bool)(resources.GetObject("label3.Enabled")));
			this.label3.Font = ((System.Drawing.Font)(resources.GetObject("label3.Font")));
			this.label3.ForeColor = System.Drawing.Color.Maroon;
			this.label3.Image = ((System.Drawing.Image)(resources.GetObject("label3.Image")));
			this.label3.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label3.ImageAlign")));
			this.label3.ImageIndex = ((int)(resources.GetObject("label3.ImageIndex")));
			this.label3.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label3.ImeMode")));
			this.label3.Location = ((System.Drawing.Point)(resources.GetObject("label3.Location")));
			this.label3.Name = "label3";
			this.label3.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label3.RightToLeft")));
			this.label3.Size = ((System.Drawing.Size)(resources.GetObject("label3.Size")));
			this.label3.TabIndex = ((int)(resources.GetObject("label3.TabIndex")));
			this.label3.Text = resources.GetString("label3.Text");
			this.label3.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label3.TextAlign")));
			this.label3.Visible = ((bool)(resources.GetObject("label3.Visible")));
			// 
			// cboCCN
			// 
			this.cboCCN.AccessibleDescription = resources.GetString("cboCCN.AccessibleDescription");
			this.cboCCN.AccessibleName = resources.GetString("cboCCN.AccessibleName");
			this.cboCCN.AddItemSeparator = ';';
			this.cboCCN.AllowRowSizing = C1.Win.C1List.RowSizingEnum.AllRows;
			this.cboCCN.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("cboCCN.Anchor")));
			this.cboCCN.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("cboCCN.BackgroundImage")));
			this.cboCCN.Caption = "";
			this.cboCCN.CaptionHeight = 17;
			this.cboCCN.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal;
			this.cboCCN.ColumnCaptionHeight = 17;
			this.cboCCN.ColumnFooterHeight = 17;
			this.cboCCN.ComboStyle = C1.Win.C1List.ComboStyleEnum.DropdownList;
			this.cboCCN.ContentHeight = 15;
			this.cboCCN.DeadAreaBackColor = System.Drawing.Color.Empty;
			this.cboCCN.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("cboCCN.Dock")));
			this.cboCCN.EditorBackColor = System.Drawing.SystemColors.Window;
			this.cboCCN.EditorFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.cboCCN.EditorForeColor = System.Drawing.SystemColors.WindowText;
			this.cboCCN.EditorHeight = 15;
			this.cboCCN.Enabled = ((bool)(resources.GetObject("cboCCN.Enabled")));
			this.cboCCN.FlatStyle = C1.Win.C1List.FlatModeEnum.System;
			this.cboCCN.Font = ((System.Drawing.Font)(resources.GetObject("cboCCN.Font")));
			this.cboCCN.GapHeight = 2;
			this.cboCCN.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("cboCCN.ImeMode")));
			this.cboCCN.ItemHeight = 15;
			this.cboCCN.Location = ((System.Drawing.Point)(resources.GetObject("cboCCN.Location")));
			this.cboCCN.MatchEntryTimeout = ((long)(2000));
			this.cboCCN.MaxDropDownItems = ((short)(5));
			this.cboCCN.MaxLength = 32767;
			this.cboCCN.MouseCursor = System.Windows.Forms.Cursors.Default;
			this.cboCCN.Name = "cboCCN";
			this.cboCCN.PartialRightColumn = false;
			this.cboCCN.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("cboCCN.RightToLeft")));
			this.cboCCN.RowDivider.Color = System.Drawing.Color.DarkGray;
			this.cboCCN.RowDivider.Style = C1.Win.C1List.LineStyleEnum.None;
			this.cboCCN.RowSubDividerColor = System.Drawing.Color.DarkGray;
			this.cboCCN.Size = ((System.Drawing.Size)(resources.GetObject("cboCCN.Size")));
			this.cboCCN.TabIndex = ((int)(resources.GetObject("cboCCN.TabIndex")));
			this.cboCCN.Text = resources.GetString("cboCCN.Text");
			this.cboCCN.Visible = ((bool)(resources.GetObject("cboCCN.Visible")));
			this.cboCCN.PropBag = "<?xml version=\"1.0\"?><Blob><Styles type=\"C1.Win.C1List.Design.ContextWrapper\"><Da" +
				"ta>Group{AlignVert:Center;Border:None,,0, 0, 0, 0;BackColor:ControlDark;}Style2{" +
				"}Style5{}Style4{}Style7{}Style6{}EvenRow{BackColor:Aqua;}Selected{ForeColor:High" +
				"lightText;BackColor:Highlight;}Style3{}Inactive{ForeColor:InactiveCaptionText;Ba" +
				"ckColor:InactiveCaption;}Footer{}Caption{AlignHorz:Center;}Normal{BackColor:Wind" +
				"ow;}HighlightRow{ForeColor:HighlightText;BackColor:Highlight;}Style1{}OddRow{}Re" +
				"cordSelector{AlignImage:Center;}Heading{Wrap:True;BackColor:Control;Border:Raise" +
				"d,,1, 1, 1, 1;ForeColor:ControlText;AlignVert:Center;}Style8{}Style10{}Style11{}" +
				"Style9{AlignHorz:Near;}</Data></Styles><Splits><C1.Win.C1List.ListBoxView AllowC" +
				"olSelect=\"False\" Name=\"\" CaptionHeight=\"17\" ColumnCaptionHeight=\"17\" ColumnFoote" +
				"rHeight=\"17\" VerticalScrollGroup=\"1\" HorizontalScrollGroup=\"1\"><ClientRect>0, 0," +
				" 116, 156</ClientRect><VScrollBar><Width>16</Width></VScrollBar><HScrollBar><Hei" +
				"ght>16</Height></HScrollBar><CaptionStyle parent=\"Style2\" me=\"Style9\" /><EvenRow" +
				"Style parent=\"EvenRow\" me=\"Style7\" /><FooterStyle parent=\"Footer\" me=\"Style3\" />" +
				"<GroupStyle parent=\"Group\" me=\"Style11\" /><HeadingStyle parent=\"Heading\" me=\"Sty" +
				"le2\" /><HighLightRowStyle parent=\"HighlightRow\" me=\"Style6\" /><InactiveStyle par" +
				"ent=\"Inactive\" me=\"Style4\" /><OddRowStyle parent=\"OddRow\" me=\"Style8\" /><RecordS" +
				"electorStyle parent=\"RecordSelector\" me=\"Style10\" /><SelectedStyle parent=\"Selec" +
				"ted\" me=\"Style5\" /><Style parent=\"Normal\" me=\"Style1\" /></C1.Win.C1List.ListBoxV" +
				"iew></Splits><NamedStyles><Style parent=\"\" me=\"Normal\" /><Style parent=\"Normal\" " +
				"me=\"Heading\" /><Style parent=\"Heading\" me=\"Footer\" /><Style parent=\"Heading\" me=" +
				"\"Caption\" /><Style parent=\"Heading\" me=\"Inactive\" /><Style parent=\"Normal\" me=\"S" +
				"elected\" /><Style parent=\"Normal\" me=\"HighlightRow\" /><Style parent=\"Normal\" me=" +
				"\"EvenRow\" /><Style parent=\"Normal\" me=\"OddRow\" /><Style parent=\"Heading\" me=\"Rec" +
				"ordSelector\" /><Style parent=\"Caption\" me=\"Group\" /></NamedStyles><vertSplits>1<" +
				"/vertSplits><horzSplits>1</horzSplits><Layout>Modified</Layout><DefaultRecSelWid" +
				"th>16</DefaultRecSelWidth></Blob>";
			// 
			// lblCCN
			// 
			this.lblCCN.AccessibleDescription = resources.GetString("lblCCN.AccessibleDescription");
			this.lblCCN.AccessibleName = resources.GetString("lblCCN.AccessibleName");
			this.lblCCN.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblCCN.Anchor")));
			this.lblCCN.AutoSize = ((bool)(resources.GetObject("lblCCN.AutoSize")));
			this.lblCCN.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblCCN.Dock")));
			this.lblCCN.Enabled = ((bool)(resources.GetObject("lblCCN.Enabled")));
			this.lblCCN.Font = ((System.Drawing.Font)(resources.GetObject("lblCCN.Font")));
			this.lblCCN.ForeColor = System.Drawing.Color.Maroon;
			this.lblCCN.Image = ((System.Drawing.Image)(resources.GetObject("lblCCN.Image")));
			this.lblCCN.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCN.ImageAlign")));
			this.lblCCN.ImageIndex = ((int)(resources.GetObject("lblCCN.ImageIndex")));
			this.lblCCN.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblCCN.ImeMode")));
			this.lblCCN.Location = ((System.Drawing.Point)(resources.GetObject("lblCCN.Location")));
			this.lblCCN.Name = "lblCCN";
			this.lblCCN.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblCCN.RightToLeft")));
			this.lblCCN.Size = ((System.Drawing.Size)(resources.GetObject("lblCCN.Size")));
			this.lblCCN.TabIndex = ((int)(resources.GetObject("lblCCN.TabIndex")));
			this.lblCCN.Text = resources.GetString("lblCCN.Text");
			this.lblCCN.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCN.TextAlign")));
			this.lblCCN.Visible = ((bool)(resources.GetObject("lblCCN.Visible")));
			// 
			// btnDelete
			// 
			this.btnDelete.AccessibleDescription = resources.GetString("btnDelete.AccessibleDescription");
			this.btnDelete.AccessibleName = resources.GetString("btnDelete.AccessibleName");
			this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnDelete.Anchor")));
			this.btnDelete.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnDelete.BackgroundImage")));
			this.btnDelete.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnDelete.Dock")));
			this.btnDelete.Enabled = ((bool)(resources.GetObject("btnDelete.Enabled")));
			this.btnDelete.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnDelete.FlatStyle")));
			this.btnDelete.Font = ((System.Drawing.Font)(resources.GetObject("btnDelete.Font")));
			this.btnDelete.Image = ((System.Drawing.Image)(resources.GetObject("btnDelete.Image")));
			this.btnDelete.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDelete.ImageAlign")));
			this.btnDelete.ImageIndex = ((int)(resources.GetObject("btnDelete.ImageIndex")));
			this.btnDelete.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnDelete.ImeMode")));
			this.btnDelete.Location = ((System.Drawing.Point)(resources.GetObject("btnDelete.Location")));
			this.btnDelete.Name = "btnDelete";
			this.btnDelete.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnDelete.RightToLeft")));
			this.btnDelete.Size = ((System.Drawing.Size)(resources.GetObject("btnDelete.Size")));
			this.btnDelete.TabIndex = ((int)(resources.GetObject("btnDelete.TabIndex")));
			this.btnDelete.Text = resources.GetString("btnDelete.Text");
			this.btnDelete.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDelete.TextAlign")));
			this.btnDelete.Visible = ((bool)(resources.GetObject("btnDelete.Visible")));
			this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
			// 
			// btnSave
			// 
			this.btnSave.AccessibleDescription = resources.GetString("btnSave.AccessibleDescription");
			this.btnSave.AccessibleName = resources.GetString("btnSave.AccessibleName");
			this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSave.Anchor")));
			this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
			this.btnSave.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSave.Dock")));
			this.btnSave.Enabled = ((bool)(resources.GetObject("btnSave.Enabled")));
			this.btnSave.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSave.FlatStyle")));
			this.btnSave.Font = ((System.Drawing.Font)(resources.GetObject("btnSave.Font")));
			this.btnSave.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.Image")));
			this.btnSave.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.ImageAlign")));
			this.btnSave.ImageIndex = ((int)(resources.GetObject("btnSave.ImageIndex")));
			this.btnSave.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSave.ImeMode")));
			this.btnSave.Location = ((System.Drawing.Point)(resources.GetObject("btnSave.Location")));
			this.btnSave.Name = "btnSave";
			this.btnSave.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSave.RightToLeft")));
			this.btnSave.Size = ((System.Drawing.Size)(resources.GetObject("btnSave.Size")));
			this.btnSave.TabIndex = ((int)(resources.GetObject("btnSave.TabIndex")));
			this.btnSave.Text = resources.GetString("btnSave.Text");
			this.btnSave.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.TextAlign")));
			this.btnSave.Visible = ((bool)(resources.GetObject("btnSave.Visible")));
			this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
			// 
			// btnAdd
			// 
			this.btnAdd.AccessibleDescription = resources.GetString("btnAdd.AccessibleDescription");
			this.btnAdd.AccessibleName = resources.GetString("btnAdd.AccessibleName");
			this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnAdd.Anchor")));
			this.btnAdd.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnAdd.BackgroundImage")));
			this.btnAdd.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnAdd.Dock")));
			this.btnAdd.Enabled = ((bool)(resources.GetObject("btnAdd.Enabled")));
			this.btnAdd.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnAdd.FlatStyle")));
			this.btnAdd.Font = ((System.Drawing.Font)(resources.GetObject("btnAdd.Font")));
			this.btnAdd.Image = ((System.Drawing.Image)(resources.GetObject("btnAdd.Image")));
			this.btnAdd.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnAdd.ImageAlign")));
			this.btnAdd.ImageIndex = ((int)(resources.GetObject("btnAdd.ImageIndex")));
			this.btnAdd.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnAdd.ImeMode")));
			this.btnAdd.Location = ((System.Drawing.Point)(resources.GetObject("btnAdd.Location")));
			this.btnAdd.Name = "btnAdd";
			this.btnAdd.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnAdd.RightToLeft")));
			this.btnAdd.Size = ((System.Drawing.Size)(resources.GetObject("btnAdd.Size")));
			this.btnAdd.TabIndex = ((int)(resources.GetObject("btnAdd.TabIndex")));
			this.btnAdd.Text = resources.GetString("btnAdd.Text");
			this.btnAdd.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnAdd.TextAlign")));
			this.btnAdd.Visible = ((bool)(resources.GetObject("btnAdd.Visible")));
			this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
			// 
			// btnEdit
			// 
			this.btnEdit.AccessibleDescription = resources.GetString("btnEdit.AccessibleDescription");
			this.btnEdit.AccessibleName = resources.GetString("btnEdit.AccessibleName");
			this.btnEdit.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnEdit.Anchor")));
			this.btnEdit.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnEdit.BackgroundImage")));
			this.btnEdit.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnEdit.Dock")));
			this.btnEdit.Enabled = ((bool)(resources.GetObject("btnEdit.Enabled")));
			this.btnEdit.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnEdit.FlatStyle")));
			this.btnEdit.Font = ((System.Drawing.Font)(resources.GetObject("btnEdit.Font")));
			this.btnEdit.Image = ((System.Drawing.Image)(resources.GetObject("btnEdit.Image")));
			this.btnEdit.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnEdit.ImageAlign")));
			this.btnEdit.ImageIndex = ((int)(resources.GetObject("btnEdit.ImageIndex")));
			this.btnEdit.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnEdit.ImeMode")));
			this.btnEdit.Location = ((System.Drawing.Point)(resources.GetObject("btnEdit.Location")));
			this.btnEdit.Name = "btnEdit";
			this.btnEdit.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnEdit.RightToLeft")));
			this.btnEdit.Size = ((System.Drawing.Size)(resources.GetObject("btnEdit.Size")));
			this.btnEdit.TabIndex = ((int)(resources.GetObject("btnEdit.TabIndex")));
			this.btnEdit.Text = resources.GetString("btnEdit.Text");
			this.btnEdit.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnEdit.TextAlign")));
			this.btnEdit.Visible = ((bool)(resources.GetObject("btnEdit.Visible")));
			this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click);
			// 
			// btnHelp
			// 
			this.btnHelp.AccessibleDescription = resources.GetString("btnHelp.AccessibleDescription");
			this.btnHelp.AccessibleName = resources.GetString("btnHelp.AccessibleName");
			this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnHelp.Anchor")));
			this.btnHelp.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnHelp.BackgroundImage")));
			this.btnHelp.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnHelp.Dock")));
			this.btnHelp.Enabled = ((bool)(resources.GetObject("btnHelp.Enabled")));
			this.btnHelp.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnHelp.FlatStyle")));
			this.btnHelp.Font = ((System.Drawing.Font)(resources.GetObject("btnHelp.Font")));
			this.btnHelp.Image = ((System.Drawing.Image)(resources.GetObject("btnHelp.Image")));
			this.btnHelp.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.ImageAlign")));
			this.btnHelp.ImageIndex = ((int)(resources.GetObject("btnHelp.ImageIndex")));
			this.btnHelp.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnHelp.ImeMode")));
			this.btnHelp.Location = ((System.Drawing.Point)(resources.GetObject("btnHelp.Location")));
			this.btnHelp.Name = "btnHelp";
			this.btnHelp.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnHelp.RightToLeft")));
			this.btnHelp.Size = ((System.Drawing.Size)(resources.GetObject("btnHelp.Size")));
			this.btnHelp.TabIndex = ((int)(resources.GetObject("btnHelp.TabIndex")));
			this.btnHelp.Text = resources.GetString("btnHelp.Text");
			this.btnHelp.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.TextAlign")));
			this.btnHelp.Visible = ((bool)(resources.GetObject("btnHelp.Visible")));
			// 
			// btnClose
			// 
			this.btnClose.AccessibleDescription = resources.GetString("btnClose.AccessibleDescription");
			this.btnClose.AccessibleName = resources.GetString("btnClose.AccessibleName");
			this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnClose.Anchor")));
			this.btnClose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnClose.BackgroundImage")));
			this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnClose.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnClose.Dock")));
			this.btnClose.Enabled = ((bool)(resources.GetObject("btnClose.Enabled")));
			this.btnClose.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnClose.FlatStyle")));
			this.btnClose.Font = ((System.Drawing.Font)(resources.GetObject("btnClose.Font")));
			this.btnClose.Image = ((System.Drawing.Image)(resources.GetObject("btnClose.Image")));
			this.btnClose.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.ImageAlign")));
			this.btnClose.ImageIndex = ((int)(resources.GetObject("btnClose.ImageIndex")));
			this.btnClose.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnClose.ImeMode")));
			this.btnClose.Location = ((System.Drawing.Point)(resources.GetObject("btnClose.Location")));
			this.btnClose.Name = "btnClose";
			this.btnClose.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnClose.RightToLeft")));
			this.btnClose.Size = ((System.Drawing.Size)(resources.GetObject("btnClose.Size")));
			this.btnClose.TabIndex = ((int)(resources.GetObject("btnClose.TabIndex")));
			this.btnClose.Text = resources.GetString("btnClose.Text");
			this.btnClose.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.TextAlign")));
			this.btnClose.Visible = ((bool)(resources.GetObject("btnClose.Visible")));
			this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
			// 
			// dtmDate
			// 
			this.dtmDate.AcceptsEscape = ((bool)(resources.GetObject("dtmDate.AcceptsEscape")));
			this.dtmDate.AccessibleDescription = resources.GetString("dtmDate.AccessibleDescription");
			this.dtmDate.AccessibleName = resources.GetString("dtmDate.AccessibleName");
			this.dtmDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dtmDate.Anchor")));
			this.dtmDate.AutoSize = ((bool)(resources.GetObject("dtmDate.AutoSize")));
			this.dtmDate.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmDate.BackgroundImage")));
			this.dtmDate.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dtmDate.BorderStyle")));
			// 
			// dtmDate.Calendar
			// 
			this.dtmDate.Calendar.AccessibleDescription = resources.GetString("dtmDate.Calendar.AccessibleDescription");
			this.dtmDate.Calendar.AccessibleName = resources.GetString("dtmDate.Calendar.AccessibleName");
			this.dtmDate.Calendar.AnnuallyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmDate.Calendar.AnnuallyBoldedDates")));
			this.dtmDate.Calendar.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmDate.Calendar.BackgroundImage")));
			this.dtmDate.Calendar.BoldedDates = ((System.DateTime[])(resources.GetObject("dtmDate.Calendar.BoldedDates")));
			this.dtmDate.Calendar.CalendarDimensions = ((System.Drawing.Size)(resources.GetObject("dtmDate.Calendar.CalendarDimensions")));
			this.dtmDate.Calendar.Enabled = ((bool)(resources.GetObject("dtmDate.Calendar.Enabled")));
			this.dtmDate.Calendar.FirstDayOfWeek = ((System.Windows.Forms.Day)(resources.GetObject("dtmDate.Calendar.FirstDayOfWeek")));
			this.dtmDate.Calendar.Font = ((System.Drawing.Font)(resources.GetObject("dtmDate.Calendar.Font")));
			this.dtmDate.Calendar.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmDate.Calendar.ImeMode")));
			this.dtmDate.Calendar.MonthlyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmDate.Calendar.MonthlyBoldedDates")));
			this.dtmDate.Calendar.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmDate.Calendar.RightToLeft")));
			this.dtmDate.Calendar.ShowClearButton = ((bool)(resources.GetObject("dtmDate.Calendar.ShowClearButton")));
			this.dtmDate.Calendar.ShowTodayButton = ((bool)(resources.GetObject("dtmDate.Calendar.ShowTodayButton")));
			this.dtmDate.Calendar.ShowWeekNumbers = ((bool)(resources.GetObject("dtmDate.Calendar.ShowWeekNumbers")));
			this.dtmDate.CaseSensitive = ((bool)(resources.GetObject("dtmDate.CaseSensitive")));
			this.dtmDate.Culture = ((int)(resources.GetObject("dtmDate.Culture")));
			this.dtmDate.CurrentTimeZone = ((bool)(resources.GetObject("dtmDate.CurrentTimeZone")));
			this.dtmDate.CustomFormat = resources.GetString("dtmDate.CustomFormat");
			this.dtmDate.DaylightTimeAdjustment = ((C1.Win.C1Input.DaylightTimeAdjustmentEnum)(resources.GetObject("dtmDate.DaylightTimeAdjustment")));
			this.dtmDate.DisplayFormat.CustomFormat = resources.GetString("dtmDate.DisplayFormat.CustomFormat");
			this.dtmDate.DisplayFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmDate.DisplayFormat.FormatType")));
			this.dtmDate.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmDate.DisplayFormat.Inherit")));
			this.dtmDate.DisplayFormat.NullText = resources.GetString("dtmDate.DisplayFormat.NullText");
			this.dtmDate.DisplayFormat.TrimEnd = ((bool)(resources.GetObject("dtmDate.DisplayFormat.TrimEnd")));
			this.dtmDate.DisplayFormat.TrimStart = ((bool)(resources.GetObject("dtmDate.DisplayFormat.TrimStart")));
			this.dtmDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dtmDate.Dock")));
			this.dtmDate.DropDownFormAlign = ((C1.Win.C1Input.DropDownFormAlignmentEnum)(resources.GetObject("dtmDate.DropDownFormAlign")));
			this.dtmDate.EditFormat.CustomFormat = resources.GetString("dtmDate.EditFormat.CustomFormat");
			this.dtmDate.EditFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmDate.EditFormat.FormatType")));
			this.dtmDate.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmDate.EditFormat.Inherit")));
			this.dtmDate.EditFormat.NullText = resources.GetString("dtmDate.EditFormat.NullText");
			this.dtmDate.EditFormat.TrimEnd = ((bool)(resources.GetObject("dtmDate.EditFormat.TrimEnd")));
			this.dtmDate.EditFormat.TrimStart = ((bool)(resources.GetObject("dtmDate.EditFormat.TrimStart")));
			this.dtmDate.EditMask = resources.GetString("dtmDate.EditMask");
			this.dtmDate.EmptyAsNull = ((bool)(resources.GetObject("dtmDate.EmptyAsNull")));
			this.dtmDate.Enabled = ((bool)(resources.GetObject("dtmDate.Enabled")));
			this.dtmDate.ErrorInfo.BeepOnError = ((bool)(resources.GetObject("dtmDate.ErrorInfo.BeepOnError")));
			this.dtmDate.ErrorInfo.ErrorMessage = resources.GetString("dtmDate.ErrorInfo.ErrorMessage");
			this.dtmDate.ErrorInfo.ErrorMessageCaption = resources.GetString("dtmDate.ErrorInfo.ErrorMessageCaption");
			this.dtmDate.ErrorInfo.ShowErrorMessage = ((bool)(resources.GetObject("dtmDate.ErrorInfo.ShowErrorMessage")));
			this.dtmDate.ErrorInfo.ValueOnError = ((object)(resources.GetObject("dtmDate.ErrorInfo.ValueOnError")));
			this.dtmDate.Font = ((System.Drawing.Font)(resources.GetObject("dtmDate.Font")));
			this.dtmDate.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmDate.FormatType")));
			this.dtmDate.GapHeight = ((int)(resources.GetObject("dtmDate.GapHeight")));
			this.dtmDate.GMTOffset = ((System.TimeSpan)(resources.GetObject("dtmDate.GMTOffset")));
			this.dtmDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmDate.ImeMode")));
			this.dtmDate.InitialSelection = ((C1.Win.C1Input.InitialSelectionEnum)(resources.GetObject("dtmDate.InitialSelection")));
			this.dtmDate.Location = ((System.Drawing.Point)(resources.GetObject("dtmDate.Location")));
			this.dtmDate.MaskInfo.AutoTabWhenFilled = ((bool)(resources.GetObject("dtmDate.MaskInfo.AutoTabWhenFilled")));
			this.dtmDate.MaskInfo.CaseSensitive = ((bool)(resources.GetObject("dtmDate.MaskInfo.CaseSensitive")));
			this.dtmDate.MaskInfo.CopyWithLiterals = ((bool)(resources.GetObject("dtmDate.MaskInfo.CopyWithLiterals")));
			this.dtmDate.MaskInfo.EditMask = resources.GetString("dtmDate.MaskInfo.EditMask");
			this.dtmDate.MaskInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmDate.MaskInfo.EmptyAsNull")));
			this.dtmDate.MaskInfo.ErrorMessage = resources.GetString("dtmDate.MaskInfo.ErrorMessage");
			this.dtmDate.MaskInfo.Inherit = ((C1.Win.C1Input.MaskInfoInheritFlags)(resources.GetObject("dtmDate.MaskInfo.Inherit")));
			this.dtmDate.MaskInfo.PromptChar = ((char)(resources.GetObject("dtmDate.MaskInfo.PromptChar")));
			this.dtmDate.MaskInfo.ShowLiterals = ((C1.Win.C1Input.ShowLiteralsEnum)(resources.GetObject("dtmDate.MaskInfo.ShowLiterals")));
			this.dtmDate.MaskInfo.StoredEmptyChar = ((char)(resources.GetObject("dtmDate.MaskInfo.StoredEmptyChar")));
			this.dtmDate.MaxLength = ((int)(resources.GetObject("dtmDate.MaxLength")));
			this.dtmDate.Name = "dtmDate";
			this.dtmDate.NullText = resources.GetString("dtmDate.NullText");
			this.dtmDate.ParseInfo.CaseSensitive = ((bool)(resources.GetObject("dtmDate.ParseInfo.CaseSensitive")));
			this.dtmDate.ParseInfo.CustomFormat = resources.GetString("dtmDate.ParseInfo.CustomFormat");
			this.dtmDate.ParseInfo.DateTimeStyle = ((C1.Win.C1Input.DateTimeStyleFlags)(resources.GetObject("dtmDate.ParseInfo.DateTimeStyle")));
			this.dtmDate.ParseInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmDate.ParseInfo.EmptyAsNull")));
			this.dtmDate.ParseInfo.ErrorMessage = resources.GetString("dtmDate.ParseInfo.ErrorMessage");
			this.dtmDate.ParseInfo.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmDate.ParseInfo.FormatType")));
			this.dtmDate.ParseInfo.Inherit = ((C1.Win.C1Input.ParseInfoInheritFlags)(resources.GetObject("dtmDate.ParseInfo.Inherit")));
			this.dtmDate.ParseInfo.NullText = resources.GetString("dtmDate.ParseInfo.NullText");
			this.dtmDate.ParseInfo.TrimEnd = ((bool)(resources.GetObject("dtmDate.ParseInfo.TrimEnd")));
			this.dtmDate.ParseInfo.TrimStart = ((bool)(resources.GetObject("dtmDate.ParseInfo.TrimStart")));
			this.dtmDate.PasswordChar = ((char)(resources.GetObject("dtmDate.PasswordChar")));
			this.dtmDate.PostValidation.CaseSensitive = ((bool)(resources.GetObject("dtmDate.PostValidation.CaseSensitive")));
			this.dtmDate.PostValidation.ErrorMessage = resources.GetString("dtmDate.PostValidation.ErrorMessage");
			this.dtmDate.PostValidation.Inherit = ((C1.Win.C1Input.PostValidationInheritFlags)(resources.GetObject("dtmDate.PostValidation.Inherit")));
			this.dtmDate.PostValidation.Validation = ((C1.Win.C1Input.PostValidationTypeEnum)(resources.GetObject("dtmDate.PostValidation.Validation")));
			this.dtmDate.PostValidation.Values = ((System.Array)(resources.GetObject("dtmDate.PostValidation.Values")));
			this.dtmDate.PostValidation.ValuesExcluded = ((System.Array)(resources.GetObject("dtmDate.PostValidation.ValuesExcluded")));
			this.dtmDate.PreValidation.CaseSensitive = ((bool)(resources.GetObject("dtmDate.PreValidation.CaseSensitive")));
			this.dtmDate.PreValidation.ErrorMessage = resources.GetString("dtmDate.PreValidation.ErrorMessage");
			this.dtmDate.PreValidation.Inherit = ((C1.Win.C1Input.PreValidationInheritFlags)(resources.GetObject("dtmDate.PreValidation.Inherit")));
			this.dtmDate.PreValidation.ItemSeparator = resources.GetString("dtmDate.PreValidation.ItemSeparator");
			this.dtmDate.PreValidation.PatternString = resources.GetString("dtmDate.PreValidation.PatternString");
			this.dtmDate.PreValidation.RegexOptions = ((C1.Win.C1Input.RegexOptionFlags)(resources.GetObject("dtmDate.PreValidation.RegexOptions")));
			this.dtmDate.PreValidation.TrimEnd = ((bool)(resources.GetObject("dtmDate.PreValidation.TrimEnd")));
			this.dtmDate.PreValidation.TrimStart = ((bool)(resources.GetObject("dtmDate.PreValidation.TrimStart")));
			this.dtmDate.PreValidation.Validation = ((C1.Win.C1Input.PreValidationTypeEnum)(resources.GetObject("dtmDate.PreValidation.Validation")));
			this.dtmDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmDate.RightToLeft")));
			this.dtmDate.ShowFocusRectangle = ((bool)(resources.GetObject("dtmDate.ShowFocusRectangle")));
			this.dtmDate.Size = ((System.Drawing.Size)(resources.GetObject("dtmDate.Size")));
			this.dtmDate.TabIndex = ((int)(resources.GetObject("dtmDate.TabIndex")));
			this.dtmDate.Tag = ((object)(resources.GetObject("dtmDate.Tag")));
			this.dtmDate.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("dtmDate.TextAlign")));
			this.dtmDate.TrimEnd = ((bool)(resources.GetObject("dtmDate.TrimEnd")));
			this.dtmDate.TrimStart = ((bool)(resources.GetObject("dtmDate.TrimStart")));
			this.dtmDate.UserCultureOverride = ((bool)(resources.GetObject("dtmDate.UserCultureOverride")));
			this.dtmDate.Value = ((object)(resources.GetObject("dtmDate.Value")));
			this.dtmDate.VerticalAlign = ((C1.Win.C1Input.VerticalAlignEnum)(resources.GetObject("dtmDate.VerticalAlign")));
			this.dtmDate.Visible = ((bool)(resources.GetObject("dtmDate.Visible")));
			this.dtmDate.VisibleButtons = ((C1.Win.C1Input.DropDownControlButtonFlags)(resources.GetObject("dtmDate.VisibleButtons")));
			this.dtmDate.Enter += new System.EventHandler(this.dtmDate_Enter);
			this.dtmDate.Leave += new System.EventHandler(this.dtmDate_Leave);
			// 
			// lblDate
			// 
			this.lblDate.AccessibleDescription = resources.GetString("lblDate.AccessibleDescription");
			this.lblDate.AccessibleName = resources.GetString("lblDate.AccessibleName");
			this.lblDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblDate.Anchor")));
			this.lblDate.AutoSize = ((bool)(resources.GetObject("lblDate.AutoSize")));
			this.lblDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblDate.Dock")));
			this.lblDate.Enabled = ((bool)(resources.GetObject("lblDate.Enabled")));
			this.lblDate.Font = ((System.Drawing.Font)(resources.GetObject("lblDate.Font")));
			this.lblDate.Image = ((System.Drawing.Image)(resources.GetObject("lblDate.Image")));
			this.lblDate.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblDate.ImageAlign")));
			this.lblDate.ImageIndex = ((int)(resources.GetObject("lblDate.ImageIndex")));
			this.lblDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblDate.ImeMode")));
			this.lblDate.Location = ((System.Drawing.Point)(resources.GetObject("lblDate.Location")));
			this.lblDate.Name = "lblDate";
			this.lblDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblDate.RightToLeft")));
			this.lblDate.Size = ((System.Drawing.Size)(resources.GetObject("lblDate.Size")));
			this.lblDate.TabIndex = ((int)(resources.GetObject("lblDate.TabIndex")));
			this.lblDate.Text = resources.GetString("lblDate.Text");
			this.lblDate.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblDate.TextAlign")));
			this.lblDate.Visible = ((bool)(resources.GetObject("lblDate.Visible")));
			// 
			// lblDay
			// 
			this.lblDay.AccessibleDescription = resources.GetString("lblDay.AccessibleDescription");
			this.lblDay.AccessibleName = resources.GetString("lblDay.AccessibleName");
			this.lblDay.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblDay.Anchor")));
			this.lblDay.AutoSize = ((bool)(resources.GetObject("lblDay.AutoSize")));
			this.lblDay.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblDay.Dock")));
			this.lblDay.Enabled = ((bool)(resources.GetObject("lblDay.Enabled")));
			this.lblDay.Font = ((System.Drawing.Font)(resources.GetObject("lblDay.Font")));
			this.lblDay.Image = ((System.Drawing.Image)(resources.GetObject("lblDay.Image")));
			this.lblDay.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblDay.ImageAlign")));
			this.lblDay.ImageIndex = ((int)(resources.GetObject("lblDay.ImageIndex")));
			this.lblDay.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblDay.ImeMode")));
			this.lblDay.Location = ((System.Drawing.Point)(resources.GetObject("lblDay.Location")));
			this.lblDay.Name = "lblDay";
			this.lblDay.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblDay.RightToLeft")));
			this.lblDay.Size = ((System.Drawing.Size)(resources.GetObject("lblDay.Size")));
			this.lblDay.TabIndex = ((int)(resources.GetObject("lblDay.TabIndex")));
			this.lblDay.Text = resources.GetString("lblDay.Text");
			this.lblDay.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblDay.TextAlign")));
			this.lblDay.Visible = ((bool)(resources.GetObject("lblDay.Visible")));
			// 
			// lblComment
			// 
			this.lblComment.AccessibleDescription = resources.GetString("lblComment.AccessibleDescription");
			this.lblComment.AccessibleName = resources.GetString("lblComment.AccessibleName");
			this.lblComment.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblComment.Anchor")));
			this.lblComment.AutoSize = ((bool)(resources.GetObject("lblComment.AutoSize")));
			this.lblComment.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblComment.Dock")));
			this.lblComment.Enabled = ((bool)(resources.GetObject("lblComment.Enabled")));
			this.lblComment.Font = ((System.Drawing.Font)(resources.GetObject("lblComment.Font")));
			this.lblComment.Image = ((System.Drawing.Image)(resources.GetObject("lblComment.Image")));
			this.lblComment.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblComment.ImageAlign")));
			this.lblComment.ImageIndex = ((int)(resources.GetObject("lblComment.ImageIndex")));
			this.lblComment.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblComment.ImeMode")));
			this.lblComment.Location = ((System.Drawing.Point)(resources.GetObject("lblComment.Location")));
			this.lblComment.Name = "lblComment";
			this.lblComment.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblComment.RightToLeft")));
			this.lblComment.Size = ((System.Drawing.Size)(resources.GetObject("lblComment.Size")));
			this.lblComment.TabIndex = ((int)(resources.GetObject("lblComment.TabIndex")));
			this.lblComment.Text = resources.GetString("lblComment.Text");
			this.lblComment.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblComment.TextAlign")));
			this.lblComment.Visible = ((bool)(resources.GetObject("lblComment.Visible")));
			// 
			// WorkDayCalendar
			// 
			this.AccessibleDescription = resources.GetString("$this.AccessibleDescription");
			this.AccessibleName = resources.GetString("$this.AccessibleName");
			this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize")));
			this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll")));
			this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
			this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
			this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
			this.CancelButton = this.btnClose;
			this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
			this.Controls.Add(this.lblComment);
			this.Controls.Add(this.lblDay);
			this.Controls.Add(this.lblDate);
			this.Controls.Add(this.btnHelp);
			this.Controls.Add(this.btnClose);
			this.Controls.Add(this.btnDelete);
			this.Controls.Add(this.btnSave);
			this.Controls.Add(this.btnAdd);
			this.Controls.Add(this.btnEdit);
			this.Controls.Add(this.cboCCN);
			this.Controls.Add(this.lblCCN);
			this.Controls.Add(this.grpWorkDay);
			this.Controls.Add(this.cboYear);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.dgrdData);
			this.Controls.Add(this.dtmDate);
			this.Enabled = ((bool)(resources.GetObject("$this.Enabled")));
			this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
			this.KeyPreview = true;
			this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
			this.MaximizeBox = false;
			this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
			this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
			this.Name = "WorkDayCalendar";
			this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
			this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
			this.Text = resources.GetString("$this.Text");
			this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.WorkDayCalendar_KeyDown);
			this.Closing += new System.ComponentModel.CancelEventHandler(this.WorkDayCalendar_Closing);
			this.Load += new System.EventHandler(this.WorkDayCalendar_Load);
			((System.ComponentModel.ISupportInitialize)(this.dgrdData)).EndInit();
			this.grpWorkDay.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.cboCCN)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.dtmDate)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// Form Load event:
		///		Clear form
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void WorkDayCalendar_Load(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".WorkOrder_Load()";
			try
			{
				Security objSecurity = new Security();
				this.Name = THIS;
				if (objSecurity.SetRightForUserOnForm(this, SystemProperty.UserName) == 0)
				{
					this.Close();
					return;
				}
				//get grid layout
				dtbGridLayOut = FormControlComponents.StoreGridLayout(dgrdData);
				dtmDate.CustomFormat = DAY_FORMAT;
				ResetForm();

				//Load CCN and set default CCN
				UtilsBO boUtils = new UtilsBO();
				DataSet dstCCN = boUtils.ListCCN();
				cboCCN.DataSource = dstCCN.Tables[MST_CCNTable.TABLE_NAME];
				cboCCN.DisplayMember	= MST_CCNTable.CODE_FLD;
				cboCCN.ValueMember		= MST_CCNTable.CCNID_FLD;
				FormControlComponents.PutDataIntoC1ComboBox(cboCCN,dstCCN.Tables[MST_CCNTable.TABLE_NAME],MST_CCNTable.CODE_FLD,MST_CCNTable.CCNID_FLD,MST_CCNTable.TABLE_NAME);
				if (SystemProperty.CCNID != 0)
				{
					cboCCN.SelectedValue = SystemProperty.CCNID;
				}
				SwitchFormMode();
				btnAdd.Enabled = true;
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}


		private void EnableControl(object pobjControl, bool pblnEnable)
		{
			const string METHOD_NAME = THIS + ".EnaleControl()";
			try
			{
				Control ctrControl = (Control) pobjControl;
				if (ctrControl.GetType() != typeof(Label))
					ctrControl.Enabled = pblnEnable;
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		private void EnableControlParent(object pobjParentControl, bool pblnEnable)
		{
			const string METHOD_NAME = THIS + ".EnableControlParent()";
			try
			{
				foreach (Control ctrChild in ((Control) pobjParentControl).Controls)
				{
					if (ctrChild is GroupBox)
					{
						foreach (Control ctrInGrougp in ctrChild.Controls)
						{
							EnableControl(ctrInGrougp, pblnEnable);
						}
					}
					else
					{
						EnableControl(ctrChild, pblnEnable);
					}
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		
		
		/// <summary>
		/// create dataset which's template for Datagrid
		/// </summary>
		private void CreateDataSet()
		{
			const string METHOD_NAME = THIS + ".CreateDataSet()";
			try
			{
				dstData = new DataSet();
				dstData.Tables.Add(MST_WorkingDayDetailTable.TABLE_NAME);
				dstData.Tables[MST_WorkingDayDetailTable.TABLE_NAME].Columns.Add(MST_WorkingDayDetailTable.WORKINGDAYMASTERID_FLD);
				dstData.Tables[MST_WorkingDayDetailTable.TABLE_NAME].Columns.Add(MST_WorkingDayDetailTable.WORKINGDAYDETAILID_FLD);
				dstData.Tables[MST_WorkingDayDetailTable.TABLE_NAME].Columns.Add(MST_WorkingDayDetailTable.OFFDAY_FLD, typeof(DateTime));
				dstData.Tables[MST_WorkingDayDetailTable.TABLE_NAME].Columns.Add(DAYOFWEEK);
				dstData.Tables[MST_WorkingDayDetailTable.TABLE_NAME].Columns.Add(MST_WorkingDayDetailTable.COMMENT_FLD);
			}
			catch (PCSException ex)
			{
				throw new PCSException(ex.mCode, METHOD_NAME, ex);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}

		/// <summary>
		/// set format for columns on the grid
		/// </summary>
		/// <param name="pblnLock"></param>
		public void ConfigGrid(bool pblnLock)
		{
			const string METHOD_NAME = THIS + ".ConfigGrid()";
			try
			{
				dgrdData.Splits[0].DisplayColumns[MST_WorkingDayDetailTable.OFFDAY_FLD].DataColumn.NumberFormat = DAY_FORMAT;
				for (int i =0; i < dgrdData.Splits[0].DisplayColumns.Count; i++)
				{
					dgrdData.Splits[0].DisplayColumns[i].Locked = pblnLock;
				}
				dgrdData.Splits[0].DisplayColumns[DAYOFWEEK].Locked = true;
				dgrdData.Splits[0].DisplayColumns[MST_WorkingDayDetailTable.OFFDAY_FLD].DataColumn.Editor = dtmDate;
				dgrdData.Splits[0].DisplayColumns[MST_WorkingDayDetailTable.OFFDAY_FLD].Style.HorizontalAlignment = AlignHorzEnum.Center;

				dgrdData.Columns[MST_WorkingDayDetailTable.OFFDAY_FLD].Caption = lblDate.Text;
				dgrdData.Columns[DAYOFWEEK].Caption = lblDay.Text;
				dgrdData.Columns[MST_WorkingDayDetailTable.COMMENT_FLD].Caption = lblComment.Text;
				
			}
			catch (PCSException ex)
			{
				throw new PCSException(ex.mCode, METHOD_NAME, ex);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}

		/// <summary>
		/// Switch form mode and set state for controls
		/// </summary>
		private void SwitchFormMode()
		{
			const string METHOD_NAME = THIS + ".SwitchFormMode()";
			try
			{
				switch (mFormMode)
				{
					case EnumAction.Default:
						EnableControlParent(this, false);
						btnAdd.Enabled = true;
						cboCCN.Enabled = true;
						dgrdData.Enabled = true;
						ConfigGrid(true);
						dgrdData.AllowDelete = false;
						dgrdData.AllowAddNew = false;
						cboYear.Enabled= true;
						break;
					case EnumAction.Add:
						EnableControlParent(this, true);
						btnAdd.Enabled = false;
						btnEdit.Enabled = false;
						btnDelete.Enabled = false;
						cboCCN.Enabled = true;
						dgrdData.Enabled = true;
						cboYear.Enabled= true;
						dgrdData.AllowDelete = true;
						dgrdData.AllowAddNew = true;
						break;
					case EnumAction.Edit:
						EnableControlParent(this, true);
						btnEdit.Enabled = false;
						btnDelete.Enabled = false;
						dgrdData.Enabled = true;
						cboCCN.Enabled = false;
						cboYear.Enabled= false;
						btnAdd.Enabled = false;
						dgrdData.AllowDelete = true;
						dgrdData.AllowAddNew = true;
						ConfigGrid(false);
						break;
				}
				btnHelp.Enabled = true;
				btnClose.Enabled = true;
			}
			catch (PCSException ex)
			{
				throw new PCSException(ex.mCode, METHOD_NAME, ex);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}

		/// <summary>
		/// Clear controls's data
		/// </summary>
		private void ResetForm()
		{
			const string METHOD_NAME = THIS + ".ResetForm()";
			try
			{
				cboYear.SelectedIndex = -1;
				chkMonday.Checked = false;
				chkTuesday.Checked = false;
				chkWednesday.Checked = false;
				chkThursday.Checked = false;
				chkFriday.Checked = false;
				chkSaturday.Checked = false;
				chkSunday.Checked = false;

				CreateDataSet();
				dgrdData.DataSource = dstData.Tables[0];
				FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayOut);
				ConfigGrid(true);
			}
			catch (PCSException ex)
			{
				throw new PCSException(ex.mCode, METHOD_NAME, ex);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}


		/// <summary>
		/// Setup some default days 
		/// </summary>
		private void CreateSomeDayNotWork()
		{
			const string METHOD_NAME = THIS + ".CreateSomeDayNotWork()";
			try
			{
				DataRow drowDay = dstData.Tables[0].NewRow();
				DateTime dtmPublicDay = new DateTime(int.Parse(cboYear.SelectedItem.ToString()), 5, 1);
				string strComment = "May Day";
				drowDay[MST_WorkingDayDetailTable.OFFDAY_FLD] = dtmPublicDay;
				drowDay[DAYOFWEEK] = dtmPublicDay.DayOfWeek;
				drowDay[MST_WorkingDayDetailTable.COMMENT_FLD]= strComment;

				dstData.Tables[0].Rows.Add(drowDay);
				
				drowDay = dstData.Tables[0].NewRow();
				dtmPublicDay = new DateTime(int.Parse(cboYear.SelectedItem.ToString()), 9, 2);
				strComment = "Independent Day";
				drowDay[MST_WorkingDayDetailTable.OFFDAY_FLD] = dtmPublicDay;
				drowDay[DAYOFWEEK] = dtmPublicDay.DayOfWeek;
				drowDay[MST_WorkingDayDetailTable.COMMENT_FLD]= strComment;

				dstData.Tables[0].Rows.Add(drowDay);
			}
			catch (PCSException ex)
			{
				throw new PCSException(ex.mCode, METHOD_NAME, ex);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}
		/// <summary>
		/// Add event:
		///		- Clear form
		///		- Set default value for controls
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnAdd_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnAdd_Click()";
			try
			{
				ResetForm();
				mFormMode = EnumAction.Add;
				SwitchFormMode();
				cboYear.SelectedItem = (new UtilsBO().GetDBDate().Year + 1).ToString();
				
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		/// <summary>
		/// Validate data
		///		- Check mandatory fields
		///		- Check some basic business rule
		/// </summary>
		/// <returns></returns>
		private bool ValidateData()
		{
			const string METHOD_NAME = THIS + ".ValidateData()";
			try
			{
				if (FormControlComponents.CheckMandatory(cboCCN))
				{
					PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
					cboCCN.Focus();
					cboCCN.Select();
					return false;
				}
				
				//check the duplicate Date on the grid
				for (int i =0; i < dgrdData.RowCount; i++)
				{
					if (dgrdData[i, MST_WorkingDayDetailTable.COMMENT_FLD].ToString().Trim() != string.Empty
						&& dgrdData[i, MST_WorkingDayDetailTable.OFFDAY_FLD].ToString().Trim() == string.Empty)
					{
						PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
						dgrdData.Row = i;
						dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[MST_WorkingDayDetailTable.OFFDAY_FLD]);
						dgrdData.Focus();
						return false;
					}
					for (int j =i+1; j < dgrdData.RowCount; j++)
					{
						if (dgrdData[i, MST_WorkingDayDetailTable.OFFDAY_FLD].ToString().Trim() ==
							dgrdData[j, MST_WorkingDayDetailTable.OFFDAY_FLD].ToString().Trim())
						{
							PCSMessageBox.Show(ErrorCode.MESSAGE_MPS_WD_DUPLICATE_DAY, MessageBoxIcon.Error);
							dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[MST_WorkingDayDetailTable.OFFDAY_FLD]);
							dgrdData.Row = j;
							dgrdData.Focus();
							return false;
						}
					}
				}
			}
			catch (PCSException ex)
			{
				throw new PCSException(ex.mCode, METHOD_NAME, ex);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
			return true;
		}
		
		/// <summary>
		/// Fill data to Object VO
		/// </summary>
		private void GetDataForVOObject()
		{
			const string METHOD_NAME = THIS + ".GetDataForVOObject()";
			try
			{
				voWorkingMaster.Mon = chkMonday.Checked;
				voWorkingMaster.Tue = chkTuesday.Checked;
				voWorkingMaster.Wed = chkWednesday.Checked;
				voWorkingMaster.Thu = chkThursday.Checked;
				voWorkingMaster.Fri = chkFriday.Checked;
				voWorkingMaster.Sat = chkSaturday.Checked;
				voWorkingMaster.Sun = chkSunday.Checked;
				voWorkingMaster.CCNID = int.Parse(cboCCN.SelectedValue.ToString());
				voWorkingMaster.Year = int.Parse(cboYear.SelectedItem.ToString());
			}
			catch (PCSException ex)
			{
				throw new PCSException(ex.mCode, METHOD_NAME, ex);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}
		/// <summary>
		/// Save event:
		///		- Validate Data
		///		- Call the method of BO class to update Data
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnSave_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnSave_Click()";
			try
			{
				blnHasError = true;
				if (ValidateData())
				{
					GetDataForVOObject();
					if (mFormMode == EnumAction.Add)
					{
						voWorkingMaster.WorkingDayMasterID = boWorkDayCalendar.AddWDCalendar(voWorkingMaster, dstData);
					}
					else
					{
						boWorkDayCalendar.UpdateWDCalendar(voWorkingMaster, dstData);
					}
					PCSMessageBox.Show(ErrorCode.MESSAGE_AFTER_SAVE_DATA);
					blnHasError = false;

					//Reload grid
					dstData = boWorkDayCalendar.GetDetailByMasterID(voWorkingMaster.WorkingDayMasterID);
					dgrdData.DataSource = dstData.Tables[0];
					FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayOut);
					ConfigGrid(true);
					
					mFormMode = EnumAction.Default;
					SwitchFormMode();
//					ExtendedProButton extend = (ExtendedProButton) btnDelete.Tag;
//					if (!extend.IsDisable)
//					{
					btnDelete.Enabled = true;
//					}
//					extend = (ExtendedProButton) btnEdit.Tag;
//					if (!extend.IsDisable)
//					{
					btnEdit.Enabled = true;
//					}
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}


		private void btnClose_Click(object sender, EventArgs e)
		{
			this.Close();
		}
		
		/// <summary>
		/// Delete event:
		///		- Delete data
		///		- Clear form
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnDelete_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnDelete_Click()";
			try
			{
				//allow delete
				if (PCSMessageBox.Show(ErrorCode.MESSAGE_DELETE_RECORD, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
				{
					boWorkDayCalendar.Delete(voWorkingMaster);
					mFormMode = EnumAction.Default;
                    ResetForm();
					SwitchFormMode();
					PCSMessageBox.Show(ErrorCode.MESSAGE_AFTER_SAVE_DATA);
					cboYear.Focus();
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		/// <summary>
		/// check existing of Working Day for a year
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void cboYear_SelectedIndexChanged(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".cboYear_SelectedIndexChanged()";
			try
			{
				if (cboYear.Text.Trim() != string.Empty)
				{
					voWorkingMaster = (MST_WorkingDayMasterVO) boWorkDayCalendar.GetWDCalendarMaster(int.Parse(cboYear.SelectedItem.ToString()), int.Parse(cboCCN.SelectedValue.ToString()));

					//if exist
					if (voWorkingMaster.WorkingDayMasterID != 0)
					{
						//disable control
						mFormMode = EnumAction.Default;
						cboCCN.Enabled = false;
						dgrdData.AllowDelete = false;
						dgrdData.AllowAddNew = false;
						ConfigGrid(true);
						//load data and change formmode
//						ExtendedProButton extend = (ExtendedProButton) btnDelete.Tag;
//						if (!extend.IsDisable)
//						{
						btnDelete.Enabled = true;
//						}
//						extend = (ExtendedProButton) btnEdit.Tag;
//						if (!extend.IsDisable)
//						{
						btnEdit.Enabled = true;
//						}
//						extend = (ExtendedProButton) btnAdd.Tag;
//						if (!extend.IsDisable)
//						{
						btnAdd.Enabled = true;
//						}

						btnSave.Enabled = false;
						chkMonday.Checked = voWorkingMaster.Mon;
						chkTuesday.Checked = voWorkingMaster.Tue;
						chkWednesday.Checked = voWorkingMaster.Wed;
						chkThursday.Checked = voWorkingMaster.Thu;
						chkFriday.Checked = voWorkingMaster.Fri;
						chkSaturday.Checked = voWorkingMaster.Sat;
						chkSunday.Checked = voWorkingMaster.Sun;

						EnableControlParent(grpWorkDay, false);

						//get detail
                        dstData = boWorkDayCalendar.GetDetailByMasterID(voWorkingMaster.WorkingDayMasterID);
						dgrdData.DataSource = dstData.Tables[0];
						FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayOut);
						ConfigGrid(true);
					}
					else
					{
						mFormMode = EnumAction.Add;
						SwitchFormMode();
						CreateDataSet();
						CreateSomeDayNotWork();
						dgrdData.DataSource = dstData.Tables[0];
						FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayOut);
						ConfigGrid(false);
						chkMonday.Checked = true;
						chkTuesday.Checked = true;
						chkWednesday.Checked = true;
						chkThursday.Checked = true;
						chkFriday.Checked = true;
						chkSaturday.Checked = true;
					}
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		
		/// <summary>
		/// Edit event:
		///		- Change formode
		///		- Enable & Disable controls 
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnEdit_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnEdit_Click()";
			try
			{
				mFormMode = EnumAction.Edit;
				SwitchFormMode();
				EnableControlParent(grpWorkDay, true);
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		
		/// <summary>
		/// Keydown event:
		///		-F12 : add new row
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void WorkDayCalendar_KeyDown(object sender, KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".WorkDayCalendar_KeyDown()";
			try
			{
				switch (e.KeyCode)
				{
					case Keys.F12:
						dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[MST_WorkingDayDetailTable.OFFDAY_FLD]);
						dgrdData.Row = dgrdData.RowCount - 1;
						dgrdData.Focus();
					break;
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		/// <summary>
		/// after user input Date for Date columns
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void dgrdData_AfterColUpdate(object sender, ColEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_AfterColUpdate()";
			try
			{
				if (e.Column.DataColumn.DataField == MST_WorkingDayDetailTable.OFFDAY_FLD)
				{
					if (e.Column.DataColumn.Value.ToString() == string.Empty)
					{
						e.Column.DataColumn.Value = DBNull.Value;
						dgrdData[dgrdData.Row, DAYOFWEEK] = string.Empty;
					}
					else
					{
						dgrdData[dgrdData.Row, DAYOFWEEK] = DateTime.Parse(e.Column.DataColumn.Value.ToString()).DayOfWeek;
					}
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		private void WorkDayCalendar_Closing(object sender, CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".WorkOrder_Closing()";
			try
			{
				if (mFormMode != EnumAction.Default)
				{
					DialogResult confirmDialog = PCSMessageBox.Show(ErrorCode.MESSAGE_QUESTION_STORE_INTO_DATABASE, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
					switch (confirmDialog)
					{
						case DialogResult.Yes:
							//Save before exit
							btnSave_Click(btnSave, new EventArgs());
							if (blnHasError)
							{
								e.Cancel = true;
							}
							break;
						case DialogResult.No:
							break;
						case DialogResult.Cancel:
							e.Cancel = true;
							break;
					}
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		private void dtmDate_Enter(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".dtmDate_Enter()";
			try
			{
				if (dgrdData[dgrdData.Row, dgrdData.Col].ToString() == string.Empty)
				{
					dtmDate.Value = new DateTime(int.Parse(cboYear.SelectedItem.ToString()), DateTime.Now.Month, DateTime.Now.Day);
				}
				else
				{
					dtmDate.Value = DateTime.Parse(dgrdData[dgrdData.Row, dgrdData.Col].ToString());
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		private void dtmDate_Leave(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".dtmDate_Leave()";
			try
			{
				if (dtmDate.Text.ToString() == string.Empty)
				{
					dtmDate.Value = DBNull.Value;
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
	}
}

